package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.*;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author louk
 * @date 2019/10/18 9:05
 */
public interface UploadMapper {
    //对用户批量新增
    int updateListUser(@Param("userList") List<User> userList);
    //批量新增物料
    int updateListMaterial(@Param("materialXOList") List<MaterialXO> materialXOList);
    //批量新增车间
    int updateListWorkShop(@Param("workShopList") List<WorkShop> workShopList);
    //批量新增产线
    int updateListProductLine(@Param("productLineList") List<ProductLine> productLineList);
    //批量新增工位
    int updateListStation(@Param("stationList") List<Station> stationList);
    //批量新增工序
    int updateListPro(@Param("proList") List<Pro> proList);
    //批量新增采集项目
    int updateListDetePro(@Param("deteProList") List<Dete> deteProList);
    //批量新增设备
    int updateListEquipment(@Param("equipmentList") List<Equipment> equipmentList);
    //批量新增托盘
    int updateListPallet(@Param("palletsList") List<Pallets> palletsList);
    //批量新增班次
    int updateListClasses(@Param("classesList") List<Classes> classesList);
    //批量新增条码规则
    int updateListRuleList(@Param("ruleListList") List<RuleList> ruleListList);
    //批量新增不良原因
    int updateListBlyy(@Param("blyyList") List<Blyy> blyyList);
    //批量新增不良对策
    int updateListBldc(@Param("bldcList") List<Bldc> bldcList);
    //查询部门
    @MapKey("vcDepName")
    Map<String, Dep> queryDep();

    //查询数据字典当中的数据
    //物料类型101027
    //计量单位101003
    //物料来源  101033
    @MapKey("vcItemName")
    Map<String, Datadict> queryType(@Param("lDictId") Integer lDictId);

    @MapKey("staName")
    Map<String, Station> queryStation();

    @MapKey("ruleName")
    Map<String, Rule> queryRule();

    @MapKey("mtypeName")
    Map<String, MtypeXO> queryMtype();

    @MapKey("workshopName")
    Map<String,WorkShop> queryWorkShop();

    @MapKey("vcProductionLineName")
    Map<String,ProductLine> queryProductionLine();

    int getByvcDeteProj(@Param("vcDeteProj") String vcDeteProj);

    @MapKey("vcProductionLineName")
    Map<String,ProductLine> queryProductLine();
    //查询不良原因
    @MapKey("blyytypeName")
    Map<String,Blyytype> queryDefectType();
    //查询不良对策类别
    @MapKey("bldcTypeName")
    Map<String,BldcType> queryBadCountermeasuresType();
}
